package com.xyy.saas.payment.cores.enums;


/**
 * 三方聚合接入方式
 */
public enum JDPayAccessTypeEnum {

    MINIAPP("MINIAPP", "小程序"),
    WX_JSAPI("WX_JSAPI", "微信JSAPI"),
    WX_APP("WX_APP", "微信APP支付"),
    UNIYUN_WAP_PAY("UNIYUN_WAP_PAY", "云闪付WAP支付"),
    ;

    private String code;
    private String desc;

    JDPayAccessTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static JDPayAccessTypeEnum getEnum(String code) {
        for (JDPayAccessTypeEnum t : values()) {
            if (t.code.equals(code)) {
                return t;
            }
        }
        throw new IllegalArgumentException("JDPayAccessTypeEnum is illegal");
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

}
